package cn.rulian.base.auth.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import cn.rulian.base.auth.bo.User;

/**
 * 用户管理 DAO
 */
public interface UserDao extends JpaRepository<User, Long> , JpaSpecificationExecutor<User>
{
	User findFirstByLoginNameAndPassword(String loginName,String pwd);
	User findFirstByLoginName(String loginName);
	List<User> findByOrgan_id(Long organId);
	
	/**
	 * 根据岗位查询用户列表
	 */
	List<User> findByPostOrderByOrderNum(String post);
}
